﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Xing : MonoBehaviour
{
    public int score = 0;
    private float distance;
    private void OnCollisionEnter2D(Collision2D coll)
    {
        distance = Vector2.Distance(coll.transform.position,this.transform.position);
        if (distance<=5)
        {
            Destroy(this.gameObject);
            score++;
        }
    }
}
